package com.zhou.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.zhou.dao.IUserDao;
import com.zhou.pojo.User;
import com.zhou.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service(interfaceClass = IUserService.class)
@Transactional
public class UserServiceimpl implements IUserService {
    @Autowired
    private IUserDao iUserDao;

    @Override
    public List<User> findAll() {

        return iUserDao.findAll();
    }

    @Override
    public User findById(int id) {
        return iUserDao.findById(id);
    }

    @Override
    public void update(User user) {
        iUserDao.update(user);
    }
}
